#ifndef symInput_h__
#define symInput_h__
#include "../skyAdapter.h"
#ifdef _SYMBIAN
#include <coecntrl.h>
#include <aknappui.h>
#include "./inc/sky.h"
namespace Sky
{
	class OSInput : public Object
	{
	public:
		Key::Code keyCode;
		Key::Type m_Type;
		const TKeyEvent* keyEvent;
		TEventCode type;
	public:
		TBool convertInput(const TKeyEvent &aKeyEvent, TEventCode aType)
		{
			type = aType;
			keyEvent = &aKeyEvent;
			switch(aKeyEvent.iCode)
			{
			case EKeyDownArrow:
				keyCode = Key::DOWN;
				break;
			case EKeyUpArrow:
				keyCode = Key::UP;
				break;
			case EKeyLeftArrow:
				keyCode = Key::LEFT;
				break;
			case EKeyRightArrow:
				keyCode = Key::RIGHT;
				break;
			case EKeyDevice0:
				keyCode = Key::FUN_LEFT;
				break;
			case EKeyDevice1:
				keyCode = Key::FUN_RIGHT;
				break;
			case '0':
				keyCode = Key::NUM0;
				break;
			case '1':
				keyCode = Key::NUM1;
				break;
			case '2':
				keyCode = Key::NUM2;
				break;
			case '3':
				keyCode = Key::NUM3;
				break;
			case '4':
				keyCode = Key::NUM4;
				break;
			case '5':
				keyCode = Key::NUM5;
				break;
			case '6':
				keyCode = Key::NUM6;
				break;
			case '7':
				keyCode = Key::NUM7;
				break;
			case '8':
				keyCode = Key::NUM8;
				break;
			case '9':
				keyCode = Key::NUM9;
				break;
			case EKeyEnter:
				keyCode = Key::ENTER;
				break;
			}
			switch(aType)
			{
			case EEventNull:
				break;
			case EEventKey:
				m_Type = Key::KeyRepeat;
				break;
			case EEventKeyUp:
				m_Type = Key::KeyUp;
				break;
			case EEventKeyDown:
				m_Type = Key::KeyDown;
				break;
			}
			return vTrue;
		}
	};
}
#endif	//_SYMBIAN
#endif	// symInput_h__
